package web.base.system.message;

import blue.core.dict.State;
import blue.validation.group.SaveModel;
import blue.validation.group.UpdateModel;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author Jin Zheng
 * @since 1.0 2020-09-02
 */
public class RoleRequest
{
	@NotNull(groups = {UpdateModel.class}, message = "ID不能为空")
	private Integer id;
	@NotEmpty(groups = {SaveModel.class, UpdateModel.class}, message = "代码不能为空")
	@Size(groups = {SaveModel.class, UpdateModel.class}, max = 50, message = "代码长度不能超过50个字符")
	private String code;
	@NotEmpty(groups = {SaveModel.class, UpdateModel.class}, message = "名称不能为空")
	@Size(groups = {SaveModel.class, UpdateModel.class}, max = 20, message = "名称长度不能超过20个字符")
	private String name;
	@Size(groups = {SaveModel.class, UpdateModel.class}, max = 200, message = "描述长度不能超过20个字符")
	private String descp;
	private State state;

	public RoleRequest()
	{
	}

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public String getCode()
	{
		return code;
	}

	public void setCode(String code)
	{
		this.code = code;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getDescp()
	{
		return descp;
	}

	public void setDescp(String descp)
	{
		this.descp = descp;
	}

	public State getState()
	{
		return state;
	}

	public void setState(State state)
	{
		this.state = state;
	}
}
